package Leason3;

import java.util.Arrays;
import java.util.Scanner;

public class ArrayReverseExample {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		
		String name = "";
		
		String[] names = new String [3];
		String[] reverse = names;
		
		for(int i = 0; i < names.length; i++ )
		{
			name = sc.nextLine();
			names[i] = name;			
		}
		System.out.println(Arrays.toString(names));
		
		for (int i = names.length-1; i >= 0 ; i--)
		{
			System.out.print(reverse[i]+" ");
		}
		
		
	}
	}